module Isogram where

import Data.Char (toLower)
import Data.List (sort, group)

isIsogram :: String -> Bool
isIsogram [x] = True
isIsogram input = if x == y then False else isIsogram (y:xs)
    where x:y:xs = sort $ map toLower input

isIsogram2 :: String -> Bool
isIsogram2 = all (\ xs -> length xs == 1) . group . sort . map toLower
